#pragma once
#ifndef SVM_PREDICT_H
#define SVM_PREDICT_H
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <string>
#include <vector>
#include "svm.h"
#include <SPI.h>
#include <SD.h>
#include "log.h"
#include "psram_manager.h"
#include "tools.h"


// Function prototypes
int print_null(const char *s, ...);
void exit_input_error(int line_num);
void predict(File input, File output);
void exit_with_help();
int svmPredict(int argc, char** argv);

// Global variables
extern struct svm_node *x;
extern int max_nr_attr;
extern double predict_label;
extern double tmpMaxPredict;
extern struct svm_model* model;
extern int predict_probability;
extern char *line;
extern int max_line_len;

// Helper function to read lines from file
static char* readline(File input);

#endif // SVM_PREDICT_H